<template>
  <div class="left-panel">
    <div class="menu-list">
      <template v-for="(text,key) in types">
        <div class="item" :class="key === typeActive?'active':''" @click="switchType(key)">
          <div class="name">{{ text }}</div>
        </div>
      </template>
    </div>
  </div>
</template>
<script setup lang="ts">
import {useTypes} from '@/hooks/filesHooks/types.ts';

let {types, typeActive, switchType} = useTypes();
</script>


<style scoped lang="scss">
.left-panel {
  width: 200px !important;
  background: #eee;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ccc;


  .menu-list {
    display: flex;
    flex-direction: column;

    .item {
      display: flex;
      padding: 8px 8px 8px 16px;
      width: 100%;
      cursor: pointer;
      font-size: 14px;
      align-items: center;

      .name {
        font-size: 14px;
        line-height: 30px;
      }
    }

    .item:hover {
      background: #e1e1e1;
    }

    .active {
      background: #ccc;
    }
  }
}
</style>